﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" Inherits="System.Web.Mvc.ViewPage<IList<PortalUser>>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
<% this.Title = JSC.Portal.Web.App.Resources.Msg.UserManagement;  %>
<script type="text/javascript">
    $(function() {
        $("#grid").flexigrid({
            usepager: false, title: "<%= JSC.Portal.Web.App.Resources.Msg.PortalUsers %>", useRp: false
        });
    });
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table id="grid">
        <thead>
            <tr>
                <th width="100"><%= JSC.Portal.Web.App.Resources.Msg.Action %></th>
                <th width="100"><%= JSC.Portal.Web.App.Resources.Msg.Username %></th>
                <th width="100"><%= JSC.Portal.Web.App.Resources.Msg.LastName %></th>
                <th width="100"><%= JSC.Portal.Web.App.Resources.Msg.FirstName %></th>
                <th width="100"><%= JSC.Portal.Web.App.Resources.Msg.EMail %></th>
                <th width="100"><%= JSC.Portal.Web.App.Resources.Msg.LastLogin %></th>
                <th width="100"><%= JSC.Portal.Web.App.Resources.Msg.LastIP %></th>
            </tr>
        </thead>
        <tbody>
            <%foreach (PortalUser user in ViewData.Model) { %>
            <tr>
                <td>
                    <%= Html.GridLinkButton(JSC.Portal.Web.App.Resources.Msg.Edit, Url.Action("Edit", new { id = user.Id }))%>
                </td>
                <td>
                    <%= user.Username %>
                </td>
                <td>
                    <%= user.Lastname %>
                </td>
                <td>
                    <%= user.Firstname %>
                </td>
                <td>
                    <%= user.EMail %>
                </td>
                <td>
                    <%= user.LastLogin.ToString("dd-MM-yyyy HH:mm:ss") %>
                </td>
                <td>
                    <%= user.LastIP %>
                </td>
            </tr>
            <%}%>
        </tbody>
    </table><br />
    <div class="button-bar-right">
        <%= Html.LinkButtonRight(JSC.Portal.Web.App.Resources.Msg.AddPortalUser, Url.Action("Create"))%>
    </div>
</asp:Content>
